﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Vote.Web.Models
{
    /// <summary>
    /// 投票结果类
    /// </summary>
    public class VoteResultListViewModel
    {
        /// <summary>
        /// 活动主键
        /// </summary>
        public Int32 ActionId { get; set; }
        /// <summary>
        /// 活动名称
        /// </summary>
        public String ActionName { get; set; }

        public DateTime BeginTime { get; set; }

        public DateTime EndTime { get; set; }

        /// <summary>
        /// 分组列表
        /// </summary>
        public List<GroupViewModel> GroupList { get; set; }
    }

    /// <summary>
    /// 分组
    /// </summary>
    public class GroupViewModel
    {
        public Int32 Id { get; set; }
        /// <summary>
        /// 分组名称
        /// </summary>
        public String Groupname { get; set; }
        public string GroupDesc { get; set; }
        /// <summary>
        /// 投票类型
        /// </summary>
        public int VoteType { get; set; }

        public List<VoteItemResultViewModel> VoteResult { get; set; }

        public String Result { get; set; }
        /// <summary>
        /// 最小必选数
        /// </summary>
        public Int32 MinNum { get; set; }
        /// <summary>
        /// 最大必选数
        /// </summary>
        public Int32 MaxNum { get; set; }
    }

    public class VoteItemResultViewModel
    {
        /// <summary>
        /// 选项主键
        /// </summary>
        public Int32 ItemID { get; set; }
        /// <summary>
        /// 选项名字
        /// </summary>
        public String ItemName { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        public string ImageUrl { get; set; }
        /// <summary>
        /// 选项对应的视频URL
        /// </summary>
        public String Videourl { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Desc { get; set; }
        /// <summary>
        /// 得票数
        /// </summary>
        public Int32 VoteCount { get; set; }
        /// <summary>
        /// 投票人
        /// </summary>
        public List<String> VoteNames { get; set; }

        #region 导出EXcel使用
        public string ItemIndex { get; set; }

        #endregion
       
    }
}